package com.lh.feign;

import feign.Request;
import feign.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.Ordered;
import java.util.Map;

/**
 * @author: linghao
 * @since: 2022/10/26
 */
public class LoggingFeignClientInterceptor implements FeignClientInterceptor, Ordered {

    private static final int ORDER = 2147483647;
//    @Autowired
//    private FeignLoggingHelper feignLoggingHelper;

    @Override
    public boolean beforeExecute(Request request, Map<String, Object> attchment) {
        return FeignClientInterceptor.super.beforeExecute(request, attchment);
    }

    @Override
    public Response afterExecute(Request request, Map<String, Object> attchment, Response response, Throwable e) {
        return FeignClientInterceptor.super.afterExecute(request, attchment, response, e);
    }

    @Override
    public int getOrder() {
        return ORDER;
    }
}
